import mallApi from "@/api/declaration/mall/mallApi"
import httpRequest from "@/config/axios/httpRequest"
import { BannerModel } from "@/models/mall/BannerModel"

// 查询Banner管理列表
export const getBannerPage = async (params) => {
  return await httpRequest.get(mallApi.GetBannerPage,params)
}

// 查询Banner管理详情
export const getBanner = async (id: number) => {
  return await httpRequest.get(mallApi.GetBanner, { params: { id } })
}

// 新增Banner管理
export const createBanner = async (data: BannerModel) => {
  return await httpRequest.post(mallApi.CreateBanner, data)
}

// 修改Banner管理
export const updateBanner = async (data: BannerModel) => {
  return await httpRequest.put(mallApi.UpdateBanner, data)
}

// 删除Banner管理
export const deleteBanner = async (id: number) => {
  return await httpRequest.delete(mallApi.DeleteBanner, { params: { id } })
}
